\subsection{Divergence, curl, and Laplacian}
Recall the gradient operator \(\grad\), which is defined in Cartesian coordinates as
\[
	\grad = \vb e_i \frac{\partial}{\partial x_i}
\]
For a vector field \(\vb F \colon \mathbb R^3 \to \mathbb R^3\), we define the divergence of \(\vb F\) by
\[
	\div{\vb F}
\]
In Cartesian coordinates,
\[
	\div{\vb F} = \left( \vb e_i \frac{\partial}{\partial x_i} \right) \cdot (F_j \vb e_j) = \pdv{F_i}{x_i}
\]
Note that the divergence of a vector field is a scalar field.
We define the curl of \(\vb{F}\) to be
\[
	\curl{\vb F}
\]
In Cartesian coordinates,
\[
	\curl{\vb F} = \left( \vb e_j \pdv{x_j} \right) \times (F_k \vb e_k) = e_j \times \left[ \pdv{x_j}(F_k \vb e_k) \right] = (\vb e_j \times \vb e_k) \pdv{F_k}{x_j} = \varepsilon_{ijk} \pdv{F_k}{x_j}\vb e_i
\]
Hence (just in Cartesian coordinates):
\[
	\left[ \curl{\vb F} \right]_i = \varepsilon_{ijk} \pdv{F_k}{x_j}
\]
The curl of a vector field is another vector field.
In terms of a `formal' determinant, we can write
\[
	\curl{\vb F} = \det \begin{pmatrix}
		\vb e_1    & \vb e_2    & \vb e_3    \\
		\pdv*{x_1} & \pdv*{x_2} & \pdv*{x_2} \\
		F_1        & F_2        & F_3
	\end{pmatrix}
\]
We cannot trivially generalise the curl operator to spaces that do not have three spatial dimensions.
Finally, we define the Laplacian of a scalar field \(f \colon \mathbb R^3 \to \mathbb R\) as
\[
	\laplacian{f} \coloneq \div{\grad{f}}
\]
In Cartesian coordinates, \([\grad{f}]_i = \pdv*{f}{x_i}\), so
\[
	\laplacian{f} = \pdv{f}{x_i}{x_i}
\]

\subsection{Explanation of divergence and curl}
Consider
\[
	\vb F(\vb x) = \vb x
\]
Using Cartesian coordinates,
\[
	\div{\vb F} = \pdv{x_i}x_i = \delta_{ii} = 3
\]
\[
	[\curl{\vb F}]_i = \varepsilon_{ijk} \pdv{x_j} x_k = \varepsilon_{ijk} \delta_{kj} = \varepsilon_{ijj} = 0
\]
A positive divergence at a point indicates that the vector field is generally pointing away from that point.
If thought of as a fluid, the point acts as a `source' of fluid.
A negative divergence indicates that the vector field is pointing towards that point, so it acts like a `sink'.
If a vector field has zero divergence, it can be thought of as representing the velocity of an incompressible fluid.
The curl measures the local rotation of the vector field (or the related `fluid') in a given direction.
If the vector field was going anticlockwise in the \(\vb e_1\)-\(\vb e_2\) plane, then the component of the curl in the \(\vb e_3\) direction would be positive.
If there is no local rotation, then the component is zero.

\subsection{Identities}
\begin{proposition}
	For \(f, g\) scalar fields, \(\vb F, \vb G\) vector fields, the following identities hold.
	\begin{itemize}
		\item \(\grad(fg) = (\grad f)g + (\grad g)f\)
		\item \(\div(f \vb F) = (\grad f)\cdot \vb F + (\div {\vb F})f\)
		\item \(\curl(f \vb F) = (\grad f)\times \vb F + (\curl {\vb F})f\)
		\item \(\grad(\vb F \cdot \vb G) = \vb F \times (\curl{\vb G}) + \vb G \times (\curl{\vb F}) + (\vb F \cdot \grad)\vb G + (\vb G \cdot \grad)\vb F\)
		\item \(\curl(\vb F \times \vb G) = \vb F(\div{\vb G}) - \vb G(\div{\vb F}) + (\vb G \cdot \grad)\vb F - (\vb F \cdot \grad)\vb G\)
		\item \(\div(\vb F \times \vb G) = (\curl{\vb F}) \cdot \vb G - \vb F \cdot (\curl{\vb G})\)
	\end{itemize}
\end{proposition}
Note, for example, that we can compute the dot product between vector fields and operators:
\[
	\left[ (\vb F \cdot \grad) \vb G \right]_i = \left( F_j \pdv{x_j} \right) G_i = F_j \pdv{G_i}{x_j}
\]
Specifically, \(\vb F \cdot \grad\) is a differential operator, and \(\div{\vb F}\) is a scalar field; they are not the same thing.
\begin{proof}
	We will only prove the fifth one for now, as all the proofs are similar.
	The identities hold in any coordinate system, so we will choose the Cartesian coordinate system since the basis vectors are the same everywhere.
	\begin{align*}
		[\curl(\vb F \times \vb G)]_i & = \varepsilon_{ijk} \pdv{x_j} (\vb F \times \vb G)_k                                                            \\
		                              & = \varepsilon_{ijk} \pdv{x_j} \varepsilon_{klm} F_l G_m                                                         \\
		                              & = \varepsilon_{ijk} \varepsilon_{klm} \pdv{x_j} F_l G_m                                                         \\
		                              & = \varepsilon_{ijk} \varepsilon_{klm} \left( F_l \pdv{G_m}{x_j} + G_l \pdv{F_l}{x_j}  \right)                   \\
		                              & = (\delta_{il}\delta_{jm} - \delta_{im}\delta_{jl}) \left( F_l \pdv{G_m}{x_j} + G_l \pdv{F_l}{x_j} \right)      \\
		                              & = F_i \pdv{G_j}{x_j} - F_j \pdv{G_i}{x_j} + G_j \pdv{F_i}{x_j} - G_i \pdv{F_j}{x_j}                             \\
		                              & = [\vb F(\div{\vb G})]_i - [(\vb F \cdot \grad)\vb G]_i + [(\vb G \cdot \grad)\vb F]_i - [(\div{\vb F})\vb G]_i
	\end{align*}
\end{proof}

\subsection{Definitions in orthogonal curvilinear coordinate systems}
For a general set of orthogonal curvilinear coordinates, divergence is defined by
\[
	\div{\vb F} = \left( \vb e_u \frac{1}{h_u} \pdv{u} + \vb e_v \frac{1}{h_v} \pdv{v} + \vb e_w \frac{1}{h_w} \pdv{w} \right) \cdot \left( F_u \vb e_u + F_v \vb e_v + F_w \vb e_w \right)
\]
We would get terms like
\begin{align*}
	\left( \vb e_u \frac{1}{h_u} \pdv{u} \right) \cdot (F_v \vb e_v) & = \frac{1}{h_u} \vb e_u \cdot \left[ \pdv{u}(F_v \vb e_v) \right]                       \\
	                                                                 & = \frac{1}{h_u} \vb e_u \cdot \left[ \pdv{F_v}{u}\vb e_v + \pdv{\vb e_v}{u} F_v \right] \\
	                                                                 & = \frac{F_v}{h_u} \left( \vb e_u \cdot \pdv{\vb e_v}{u} \right)
\end{align*}
We can combine all such terms and then derive that
\[
	\div{\vb F} = \frac{1}{h_u h_v h_w} \left[ \pdv{u} (h_v h_w F_u) + \pdv{v} (h_u h_w F_v) + \pdv{w} (h_u h_v F_w) \right]
\]
\[
	\curl{\vb F} = \frac{1}{h_u h_v h_w} \begin{vmatrix}
		h_u \vb e_u & h_v \vb e_v & h_w \vb e_w \\
		\pdv*{u}    & \pdv*{v}    & \pdv*{w}    \\
		h_u F_u     & h_v F_v     & h_w F_w
	\end{vmatrix}
\]
\[
	\laplacian{f} = \frac{1}{h_u h_v h_w} \left[ \pdv{u} \left( \frac{h_v h_w}{h_u} \pdv{f}{u} \right) + \pdv{v} \left( \frac{h_u h_w}{h_v} \pdv{f}{v} \right) + \pdv{w} \left( \frac{h_u h_v}{h_w} \pdv{f}{w} \right) \right]
\]
For cylindrical polar coordinates \((\rho, \phi, z)\), we have \((h_\rho, h_\phi, h_z) = (1, \rho, 1)\) and hence
\[
	\div{\vb F} = \frac{1}{\rho} \pdv{\rho} (\rho F_\rho) + \frac{1}{\rho} \pdv{F_\phi}{\phi} + \pdv{F_z}{z}
\]
\[
	\curl{\vb F} = \frac{1}{\rho} \begin{vmatrix}
		\vb e_\rho  & \rho \vb e_\phi & \vb e_z  \\
		\pdv*{\rho} & \pdv*{\phi}     & \pdv*{z} \\
		F_\rho      & \rho F_\phi     & F_z
	\end{vmatrix}
\]
\[
	\laplacian{f} = \frac{1}{\rho} \pdv{\rho} \left( \rho \pdv{f}{\rho} \right) + \frac{1}{\rho^2} \pdv[2]{f}{\phi} + \pdv[2]{f}{z}
\]
For spherical polar coordinates \((r, \theta, \phi)\), we have \((h_r, h_\theta, h_\phi) = (1, r, r\sin\theta)\) and hence
\[
	\div{\vb F} = \frac{1}{r^2} \pdv{r}(r^2 F_r) + \frac{1}{r\sin\theta} \pdv{\theta}(\sin \theta\, F_\theta) + \frac{1}{r\sin\theta} \pdv{F_\phi}{\phi}
\]
\[
	\curl{\vb F} = \frac{1}{r^2\sin\theta} \begin{vmatrix}
		\vb e_r  & r \vb e_\theta & r\sin\theta\, \vb e_\phi \\
		\pdv*{r} & \pdv*{\theta}  & \pdv*{\phi}              \\
		F_r      & r F_\theta     & r\sin\theta\, F_\phi
	\end{vmatrix}
\]
\[
	\laplacian{f} = \frac{1}{r^2} \pdv{r} \left( r^2 \pdv{f}{r} \right) + \frac{1}{r^2 \sin\theta} \pdv{\theta} \left( \sin \theta \pdv{f}{\theta} \right) + \frac{1}{r^2\sin^2 \theta} \pdv[2]{f}{\phi}
\]

\subsection{Laplacian of a vector field}
The Laplacian of a vector field might be expected to be something like \(\div(\grad {\vb F})\).
However, we have not defined the gradient of a vector field.
In Cartesian coordinates, it would make sense that
\begin{equation}
	\laplacian{\vb F} = \laplacian(F_i \vb e_i) = (\laplacian{F_i})\vb e_i
	\tag{\(\dagger\)}
\end{equation}
If this is the case, we can show then that, in Cartesian coordinates,
\[
	\laplacian{\vb F} = \grad(\div{\vb F}) - \curl(\curl{\vb F})
\]
In other words, in Cartesian coordinates,
\[
	[\laplacian{\vb F}]_i = \pdv{F_i}{x_j}{x_j} = \laplacian(F_i)
\]
Since the right hand side of \((\dagger)\) is well-defined in any orthogonal curvilinear coordinate system, we will use it as a definition.

\subsection{Relations between differential operators}
\begin{proposition}
	For a scalar field \(f\) and a vector field \(\vb F\),
	\[
		\curl{\grad{f}} = \vb 0
	\]
	and
	\[
		\div{\curl{\vb F}} = 0
	\]
	In other words, curl \(\circ\) grad gives zero, and div \(\circ\) curl gives zero.
\end{proposition}
\begin{proof}
	We will use Cartesian coordinates for simplicity.
	\begin{align*}
		[\curl{\grad{f}}]_i & = \varepsilon_{ijk} \pdv{x_j} \left( \pdv{f}{x_k} \right) \\
		                    & = \varepsilon_{ijk} \pdv{f}{x_j}{x_k}
	\end{align*}
	\(\varepsilon_{ijk}\) is antisymmetric in \(j\) and \(k\), but \(\pdv{f}{x_j}{x_k}\) is symmetric in \(j\) and \(k\).
	Hence the result is zero.
	Further,
	\begin{align*}
		\div{\curl{\vb F}} & = \pdv{x_i} \varepsilon_{ijk} \pdv{x_j} F_k \\
		                   & = \varepsilon_{ijk} \pdv{F_k}{x_i}{x_j}
	\end{align*}
	Once again the \(\varepsilon\) term is antisymmetric and the partial derivative is symmetric, so the result follows.
\end{proof}

\subsection{Irrotational and solenoidal forces}
As a short aside, `simply connected' means that any loop in a space can be `shrunk' to any point within that space.
It can also be referred to as `1-connected' since the loop is a one-dimensional manifold.
For example, \(\mathbb R^3\) is 1-connected, but \(\mathbb R^3\) with the \(z\)-axis removed is not 1-connected; a loop around this axis cannot be shrunk to a point away from the axis.

We can write that a space is `2-connected' if it is 1-connected and any 2-manifold (surface) can be shrunk to any point within the space.
Certainly \(\mathbb R^3\) is 2-connected, but for example \(\mathbb R^3\) without the origin is not 2-connected.
The space is certainly 1-connected, but it is not 2-connected because a surface around the origin cannot be shrunk to a point away from the origin.

Recall that \(\vb F\) is conservative if we can write \(\vb F = \grad f\).
We say that \(\vb F\) is irrotational if \(\curl{\vb F} = \vb 0\).
Hence, any conservative function is irrotational.
The converse is true if the domain of \(\vb F\) is 1-connected.
We say that \(\vb F\) is solenoidal if \(\div{\vb F} = 0\).
If there exists a vector potential \(\vb A\) for \(\vb F\), i.e.\ \(\vb F = \curl{\vb A}\), then \(\vb F\) is solenoidal.
The converse is true if the domain of \(\vb F\) is 2-connected.
